package com.longtengyuyun;

/**
 * @author ZhaoYunLong
 * @date 2022/3/18
 * @description
 */
public class TestThree {
    static boolean flag;
    public static void main(String[] args) {

        new Thread(()->{
            System.out.println("start");
            while (!flag) {
//                System.out.println("this flag " + flag);
            }
            System.out.println("end");
        }).start();
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        flag = true;
    }
}
